package com.sf.marathon.soul.core.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.baomidou.mybatisplus.plugins.PaginationInterceptor;

/**
 * MybatisPlus配置<br>
 *
 * @author liutao
 *         2017/6/19 14:48
 */
@Configuration
public class MybatisPlusConfig {

    /**
     * mybatis-plus分页插件
     *
     * @return
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        // 开启本地线程分页
        paginationInterceptor.setLocalPage(true);
        return paginationInterceptor;
    }
}
